﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    /// <summary>
    /// 查询门诊患者预交金余额
    /// </summary>
    public class CMZXX002App : ApiBaseApp<CMZXX002>
    {
        public CMZXX002App(IApiRepository<CMZXX002> repository) : base(repository)
        {
        }
        /// <summary>
        /// 查询门诊患者预交金余额
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public IEnumerable<CMZXX002Response> QueryAccount(CMZXX002 model)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Patid", model.patid));
            param.Add(new SqlParameter("@Hzxm", model.hzxm));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CMZXX002Response>("exec usp_web_webtrans_CMZXX002 @patid=@Patid,@hzxm=@Hzxm,@czyh=@Czyh", param);
            return result;
        }
    }
}
